#include "ZigbusNetworkId.h"

ZigbusNetworkId::ZigbusNetworkId() : ZigbusItem(-1, NETWORK_ID_SIZE)
{
}

ZigbusNetworkId::ZigbusNetworkId(int value)
    : ZigbusItem(value, NETWORK_ID_SIZE)
{
}

ZigbusNetworkId::ZigbusNetworkId(const ZigbusNetworkId &other)
    : ZigbusItem(other)
{
}

ZigbusNetworkId::~ZigbusNetworkId()
{
}

QString ZigbusNetworkId::text() const
{
    QString rslt = QString::number(getValue(), 10);
    while(rslt.count() < 2) {
        rslt = "0"+rslt;
    }
    return rslt;
}

QString ZigbusNetworkId::trame() const
{
    QString rslt = text();
    while(rslt.count() < NETWORK_ID_SIZE) {
        rslt = "0"+rslt;
    }
    return rslt;
}
